<html xmlns:th="http://www.thymeleaf.org" xmlns:x="http://www.w3.org/1999/html">
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 3px;">
        <form id="orderEditForm" method="post">
            <table class="grid">
                <tr>
                    <td>订单编号</td>
                    <td>
                        <input name="orderId" type="hidden" th:value="${order.orderId}">
                        <input name="orderNumber" type="text" th:value="${order.orderNumber}" />
                    </td>
                </tr>
                <tr>
                    <td>客户姓名</td>
                    <td>
                        <input name="orderName" type="text" th:value="${order.orderName}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>订单状态</td>
                    <td>
                        <input name="orderStatus" type="text" th:value="${order.orderStatus}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>付款状态</td>
                    <td>
                        <input name="payStatus" type="text" th:value="${order.payStatus}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>付款方式</td>
                    <td>
                        <input name="payWay" type="text" th:value="${order.payWay}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>物流状态</td>
                    <td>
                        <input name="moveStatus" type="text" th:value="${order.moveStatus}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>订单金额</td>
                    <td>
                        <input name="orderPrice" type="text" th:value="${order.orderPrice}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>实付金额</td>
                    <td>
                        <input name="realityPrice" type="text" th:value="${order.realityPrice}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
                <tr>
                    <td>下单时间</td>
                    <td>
                        <input name="orderDay" type="date" th:value="${order.orderDay}"  class="easyui-validatebox" data-options="required:true" >
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    $(function() {
        $('#orderEditForm').form({
            url : basePath + '/order/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.code === 1) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
